Computers, Internet appliances, and other devices typically use software drivers that are executed by a host processor or peripheral processor, such as a graphics accelerator or any other suitable processing device. A driver, as used herein, includes, for example, a software driver that processes operating system requests or other suitable requests and programs hardware to perform operations. Typically, different software drivers are written so that they can be run by different system configurations. For example, computers may have differing manufacturer' central processing units with different hardware configurations such as system memory size, size and type of video memory, clock speed, and other system configurations. The software driver needs to decide the best path for its code to execute based on the type of CPU and hardware configuration that the driver is running on. This can help improve performance of the hardware for which the software driver is designed. Accordingly, it would be desirable to configure a software driver that can execute on a plurality of different devices so that differing software drivers need not be designed and stored for each different type of hardware configuration.
Typically, software drivers, such as display drivers and any other drivers, may be stored on a CD ROM and shipped to a customer. The CD ROM with the display driver, or any other suitable driver, may include a plurality of different drivers that are used for different hardware configurations. For example, one driver may be provided for a hardware configuration that uses a first CPU type at a first operating speed along with a graphics accelerator that operates at a specified speed, and a different driver for use with a different type of CPU operating at a different speed for a different version of the same or different graphics accelerator system. Accordingly, a different software driver is used for different hardware configurations for an Internet appliance or computer.
A challenge arises to design a software driver that provides a suitable speed of executing operations so that high system performance is perceived from the perspective of an application and a user. For example, in the case of a display driver, a display driver executes operations for a graphics accelerator to perform three dimensional image rendering by a video game application, or any other suitable application. The software display driver should execute quickly and therefore typically the shorter the code path, the faster the operation of the driver. Accordingly, it is desirable to provide a minimum number of decisions that the code has to make with the actual hardware configuration. For example, the graphics drawing capabilities may be different for different controller chips and differing CPU capabilities, memory types, etc. Each graphics chip may typically have its own software driver. Software drivers may be application program interfaces (APIs) or other software modules that have entry points in the code that the operating system calls to perform functions. For example, in the case of the display driver, the operating system may call the display driver to have a graphics accelerator, also known as a graphics controller, draw a line for display on a display device. A GDI typically defines code entry points.
Also, software drivers typically evolve from one generation of a product to another wherein additional coding is added to previous code. If the older code has software fixes for hardware problems, and later versions of the hardware are fixed, there is no need to execute old or unnecessary code since this takes additional and valuable processing time.
Therefore, a need exists for an executable program, such as a software driver, that drives a plurality of peripherals and can run more efficiently on a plurality of CPUs and host systems.